/*backbone router*/
var AppRouter = new (Backbone.Router.extend({
	initialize:function(){
		location.hash=''
	},
    routes:{
    	'bind-social-account':'bindSocialAccount',
		'bind-social-account/:id':'bindSocialAccount',
		'*acts':'defaultAction'
    },
    bindSocialAccount:function(id){
		ReactDOM.render(React.createElement(parllayComponents.NewSocialAccount, {type:id}),document.getElementById('modal'))
	},
	defaultAction:function(){
		$('body').css('overflow','auto')
	}
}));

Backbone.history.start({
	beforeAction:function(){
		ReactDOM.unmountComponentAtNode(document.getElementById('modal'));
		$('body').css('overflow','hidden')
	}
})
